﻿<style>
    .ng-invalid-pattern {
        border: 1px solid #f00;
    }
    
</style>

<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">用户管理</h1>
</div>
<div class="wrapper-md" ng-controller="userCtrl">
    <div class="panel panel-default">
        <div class="panel panel-default">
            <div class="panel-heading font-bold">查询</div>
            <div class="panel-body">
                <div class="panel-body">
                    <div class="row form-group">
                        <label class="control-label pull-left m-t-xs">关键字</label>
                        <div class="col-md-2">
                            <input type="text" class="form-control" id="fa-searchz" ng-model="searchingKeyword" placeholder="请输入关键字">
                        </div>

                        <label class="control-label pull-left m-t-xs">车牌号</label>
                        <div class="col-md-2">
                            <input type="text" class="form-control uppercase ng-pristine ng-valid-pattern ng-valid ng-valid-required ng-touched" required="" id="fa-searchz" ng-model="searchingCarcode" placeholder="请输入车牌号" name="carCode" ng-pattern="/^[\u4e00-\u9fa5]{1}[a-zA-Z]{1}[a-zA-Z_0-9]{5}$/">
                        </div>

                        <label class="control-label pull-left m-t-xs">角色</label>
                        <div class="col-md-2 form-group">
                            <select class="form-control" ng-model="searchingRoleId" ng-options="x.Id as x.chineseName for x in roles">
                                <option value="">全部</option>
                            </select>
                        </div>

                        <label class="control-label pull-left m-t-xs">审核状态</label>
                        <div class="col-md-2 form-group">
                            <select class="form-control" ng-model="searchingState" ng-options="x.value as x.text for x in checkState">
                                <option value="">全部</option>
                            </select>
                        </div>
                    </div>

                    <div class="row form-group">
                        <label class="control-label pull-left m-t-xs">起始时间</label>
                        <div class="col-md-2">
                            <input type="datetime-local" class="form-control" required="" id="startTime" name="startTime" ng-model="searchingStartTime">
                        </div>

                        <label class="control-label pull-left m-t-xs">结束时间</label>
                        <div class="col-md-2">
                            <input type="datetime-local" class="form-control" required="" id="endTime" name="endTime" ng-model="searchingEndTime">
                        </div>

                        <div class="col-md-2">
                            <button ng-click="queryUsers()" class="btn btn-default btn-addon"><i class="fa fa-search"></i>查询</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="table-responsive">
            <div ui-grid="userList" ui-grid-pagination style="min-height:420px"></div>
        </div>
    </div>

    <div class="modal bs-example-modal-lg fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">{{selectedUser.UserName}}</h4>
                </div>

                <div class="modal-body">
                    <form class="form-horizontal" id="form">
                        <div class="form-group">
                            <label class="col-md-2 control-label">用户Id</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" id="fa-searchz" ng-model="selectedUser.UserId" disabled>
                                <!--<label style="margin-bottom:0px">{{selectedUser.UserId}}</label>-->
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">车牌号</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" id="fa-searchz" ng-model="selectedUser.CarCode" disabled>
                                <!--<label style="margin-bottom:0px">{{selectedUser.CarCode}}</label>-->
                            </div>
                            <div class="col-md-2">
                                <button ng-click="linkToUsersEdit()" class="btn btn-default btn-addon">强制修改</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">实名头像</label>
                            <div class="col-md-4">
                                <div class="img-thumbnail img-borders">
                                    <img class="img-responsive" src="{{selectedUser.RealHeadImage}}" />
                                   <!-- <input type="checkbox" name="realHeadImageCertificated" ng-model="selectedUser.RealHeadImageCertificated" ng-hide="RealHeadImageCertificatedDisabled" />-->
                                    <div class="tools tools-bottom">
                                        <b>{{RealHeadImageSatus}}</b>
                                        <div ng-show="RealHeadImageTool">
                                            <a ng-hide="clickOkPassState" ng-click="clickOkPass('RealHeadImage')">
                                                <i ng-show="clickRemovePassState" class="glyphicon glyphicon-ok-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickOkPassState" ng-click="clickOk('RealHeadImage')">
                                                <i ng-show="clickRemovePassState" class="glyphicon glyphicon-ok"></i>
                                            </a>
                                            <a ng-hide="clickRemovePassState" ng-click="clickRemovePass('RealHeadImage')">
                                                <i ng-show="clickOkPassState" class="glyphicon glyphicon-remove-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickRemovePassState" ng-click="clickRemove('RealHeadImage')">
                                                <i ng-show="clickOkPassState" class="glyphicon glyphicon-remove red-remove"></i>
                                            </a>
                                            
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <label class="col-md-2 control-label">身份证</label>
                            <div class="col-md-4">
                                <div class="img-thumbnail img-borders">
                                    <img class="img-responsive" src="{{selectedUser.IDCardImage}}" />
                                   <!-- <input type="checkbox" name="idCardCertificated" ng-model="selectedUser.IdCardCertificated" ng-hide="IdCardCertificatedDisabled" />-->
                                    <div class="tools tools-bottom">
                                        <b>{{IDCardImageSatus}}</b>
                                        <div ng-show="IDCardImageTool">
                                            <a ng-hide="clickIDCardOkPassState" ng-click="clickOkPass('IDCardImage')">
                                                <i ng-show="clickIDCardRemovePassState" class="glyphicon glyphicon-ok-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickIDCardOkPassState" ng-click="clickOk('IDCardImage')">
                                                <i ng-show="clickIDCardRemovePassState" class="glyphicon glyphicon-ok"></i>
                                            </a>
                                            <a ng-hide="clickIDCardRemovePassState" ng-click="clickRemovePass('IDCardImage')">
                                                <i ng-show="clickIDCardOkPassState" class="glyphicon glyphicon-remove-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickIDCardRemovePassState" ng-click="clickRemove('IDCardImage')">
                                                <i ng-show="clickIDCardOkPassState" class="glyphicon glyphicon-remove red-remove"></i>
                                            </a>

                                        </div>
                                    </div>
                                   
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">驾驶证</label>
                            <div class="col-md-4">
                                <div class="img-thumbnail img-borders">
                                    <img class="img-responsive" src="{{selectedUser.DrivingLicenseImage}}" />
                                    <!--<input type="checkbox" name="idCardCertificated" ng-model="selectedUser.DrivingLicenseCertificated" ng-hide="DrivingLicenseCertificatedDisabled" />-->
                                    <div class="tools tools-bottom">
                                        <b>{{DrivingLicenseImageSatus}}</b>
                                        <div ng-show="DrivingLicenseImageTool">
                                            <a ng-hide="clickDrivingLicenseOkPassState" ng-click="clickOkPass('DrivingLicenseImage')">
                                                <i ng-show="clickDrivingLicenseRemovePassState" class="glyphicon glyphicon-ok-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickDrivingLicenseOkPassState" ng-click="clickOk('DrivingLicenseImage')">
                                                <i ng-show="clickDrivingLicenseRemovePassState" class="glyphicon glyphicon-ok"></i>
                                            </a>
                                            <a ng-hide="clickDrivingLicenseRemovePassState" ng-click="clickRemovePass('DrivingLicenseImage')">
                                                <i ng-show="clickDrivingLicenseOkPassState" class="glyphicon glyphicon-remove-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickDrivingLicenseRemovePassState" ng-click="clickRemove('DrivingLicenseImage')">
                                                <i ng-show="clickDrivingLicenseOkPassState" class="glyphicon glyphicon-remove red-remove"></i>
                                            </a>

                                        </div>
                                    </div>
                                    
                                </div>
                            </div>
                            <label class="col-md-2 control-label">行驶证</label>
                            <div class="col-md-4">
                                <div class="img-thumbnail img-borders">
                                    <img class="img-responsive" src="{{selectedUser.VehicleLicenseImage}}" />
                                    <!--<input type="checkbox" name="vehicleLicenseCertificated" ng-model="selectedUser.VehicleLicenseCertificated" ng-hide="VehicleLicenseCertificatedDisabled" />-->
                                    <div class="tools tools-bottom">
                                        <b>{{VehicleLicenseImageSatus}}</b>
                                        <div ng-show="VehicleLicenseImageTool">
                                            <a ng-hide="clickVehicleLicenseOkPassState" ng-click="clickOkPass('VehicleLicenseImage')">
                                                <i ng-show="clickVehicleLicenseRemovePassState" class="glyphicon glyphicon-ok-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickVehicleLicenseOkPassState" ng-click="clickOk('VehicleLicenseImage')">
                                                <i ng-show="clickVehicleLicenseRemovePassState" class="glyphicon glyphicon-ok"></i>
                                            </a>
                                            <a ng-hide="clickVehicleLicenseRemovePassState" ng-click="clickRemovePass('VehicleLicenseImage')">
                                                <i ng-show="clickVehicleLicenseOkPassState" class="glyphicon glyphicon-remove-circle blue-pass"></i>
                                            </a>
                                            <a ng-show="clickVehicleLicenseRemovePassState" ng-click="clickRemove('VehicleLicenseImage')">
                                                <i ng-show="clickVehicleLicenseOkPassState" class="glyphicon glyphicon-remove red-remove"></i>
                                            </a>

                                        </div>
                                    </div>
                               
                                 </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">说明</label>
                            <div class="col-md-6">
                                <textarea class="form-control" ng-model="selectedUser.Message" rows="4" placeholder="请输入说明"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" ng-click="submitUserInfo()">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>